<!--
<?php
print <<<EOT
--> 
<style type="text/css">
<!--
.dragTable{
	margin-top:5px;	
}
.dragTable a{
	color:#333;
}
.dragTable .trh td{
	height:25px;
	vertical-align:middle;
	text-align:center;
	background:#DDD;
	border-right:#FFF solid 1px;
}
.dragTable .trc td{
	padding:5px;
	border-bottom:#DDD dotted 1px;	
	text-align:center;
	color:#666;
}
.dragTable .trc .td1{
	width:40%;	
	color:blue;
	text-align:left;	
}
.dragTable .trc .td2{
	width:15%;	
}
.dragTable .trc .td3{
	width:15%;	
}
.dragTable .trc .td3 a{
	color:#f60	
}
.dragTable .trc .td4{
	width:8%;	
}
.dragTable .trc .td5{
	width:8%;	
}
.dragTable .choose{
	padding:8px 0 5px 10px;
}
.dragTable .page{
	padding:8px;
	text-align:center;
}
.dragTable .page a{
	border:#DDD solid 1px;
	padding:3px 5px 2px 5px;
}
.dragTable .tdL{
	height:30px;
	width:200px;
	vertical-align:middle;
	padding-right:10px;
	text-align:right;
	border-left:#C9E0FE solid 1px;
	border-bottom:#C9E0FE dotted 1px;
}
.dragTable .tdR{
	vertical-align:middle;
	border-right:#C9E0FE solid 1px;
	border-bottom:#C9E0FE dotted 1px;
	border-left:#C9E0FE dotted 1px;
	padding-left:10px;
}
.dragTable .inputsubmit{
	border:#C9E0FE  solid 1px;
	border-top:0;
	padding:5px 0 5px 200px;
}
-->
</style>
<!--
EOT;
if($job=='buy'){
print <<<EOT
-->
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="dragTable">
<form name="form1" method="post" action="?">
  <tr> 
    <td colspan="2" class='head'>购买广告</td>
  </tr>
  <tr> 
    <td class="tdL"> 广告位名称:</td>
    <td class="tdR">{$rsdb[name]}</td>
  </tr>
  <tr> 
    <td class="tdL">投放天数:</td>
    <td class="tdR">{$rsdb[day]}天</td>
  </tr>
  <tr> 
    <td class="tdL">你当前具有消费的积分数是:</td>
    <td class="tdR">{$webdb[MoneyName]}<font color="#FF0000"> <b>{$lfjdb[money]}</b></font> $webdb[MoneyDW]</td>
  </tr>
  <tr> 
    <td class="tdL">价格:(出价越高,越排前)</td>
    <td class="tdR"><input type="text" name="postdb[price]" size="5" value="$rsdb[price]"></td>
  </tr>
  <tr> 
    <td class="tdL">广告文字内容:</td>
    <td class="tdR"><input type="text" name="postdb[adword]"></td>
  </tr>
  <tr> 
    <td class="tdL">广告链接地址:</td>
    <td class="tdR"><input type="text" name="postdb[adlink]" size="50"></td>
  </tr>
  <tr>
    <td colspan="2" class="inputsubmit"> 
      <input type="submit" name="Submit" value=" 购 买 ">
      <input type="hidden" name="step" value="2">
      <input type="hidden" name="job" value="$job">
      <input type="hidden" name="id" value="$id">
    </td>
  </tr>
</form>
</table>
<!--
EOT;
}elseif($job=='list'){
print <<<EOT
-->
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" class="dragTable" >
  <tr>
  	<td class="head">现有广告位列表</td>
  </tr>
  <tr>
  	<td class="middle">
    	<table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr class="trh">
            <td class="td1">广告位名称</td>
            <td class="td2">广告空位</td>
            <td class="td3">投放天数</td>
            <td class="td4">底价</td>
            <td class="td5">广告</td>
            <td class="td6">效果</td>
            <td class="td7">购买</td>
          </tr>
<!--
EOT;
foreach($listdb AS $key=>$rs){
print <<<EOT
-->
		  <tr class="trc">
            <td class="td1">{$rs[name]}</td>
            <td class="td2">{$rs[AdNum]}(个)</td>
            <td class="td3">$rs[day]</td>
            <td class="td4">$rs[price]</td>
            <td class="td5"><a href="?job=sell_list&id=$rs[id]"><img alt='' src='$webdb[www_url]/member/images/art_icon.gif'/></a></td>
            <td class="td6"><a href="$rs[demourl]" title="点击浏览" target="_blank"><img src="$webdb[www_url]/member/images/icon_view.gif"/></a></td>
            <td class="td7"><a href="?job=buy&id=$rs[id]" style="color:red;">购买</a></td>
          </tr>
<!--
EOT;
}
print <<<EOT
-->
		  <tr> 
              <td colspan="7" class="page">$showpage</td>
          </tr>
        </table>
    </td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" class="dragTable" >
<tr> 
  <td class="head">相关信息</td>
</tr>
<tr> 
  <td class="middle" style="padding-left:10px;line-height:20px;">
    1.购买以上竞价广告,需要{$webdb[MoneyName]}购买,你当前拥有的{$webdb[MoneyName]}数是 <b><font color="#FF0000">{$lfjdb[money]}</font></b> 个 <br>
          2.如果你的{$webdb[MoneyName]}不足,你可以在线充值.<a href="$webdb[www_url]/member/money.php?job=list"><b><font color="#FF0000">我要充值</font></b></a>
  </td>
</tr>
</table>
<!--
EOT;
}elseif($job=='mylist'){
print <<<EOT
-->
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" class="dragTable" >
  <tr>
  	<td class="head">我购买的广告</td>
  </tr>
  <tr>
  	<td class="middle">
    	<table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr class="trh">
              <td width="30%">广告位名称</td>
              <td width="21%" >广告内容</td>
              <td width="27%" >投放日期</td>
              <td width="8%" >出价</td>
              <td width="14%" >操作</td>
          </tr>
<!--
EOT;
foreach($listdb AS $key=>$rs){
print <<<EOT
-->
		  <tr class="trc">
            <td style="text-align:left;">{$rs[name]}</td>
            <td><a href="{$rs[adlink]}" target="_blank">{$rs[adword]}</a></td>
            <td>开始:$rs[begintime]<br>结束:$rs[endtime] </td>
            <td>$rs[money]</td>
            <td><a href="?job=edit&ad_id=$rs[ad_id]"><img alt='点击修改' src='$webdb[www_url]/member/images/button_edit.png'/></a> 
             <a href="?action=del&ad_id=$rs[ad_id]"  onclick="return confirm('你确认要删除吗?不可恢复')"><img alt='点击删除' src='$webdb[www_url]/member/images/del_icon2.gif'></a></td>
          </tr>
<!--
EOT;
}
print <<<EOT
-->
		  <tr> 
              <td colspan="5" class="page">$showpage</td>
          </tr>
        </table>
    </td>
  </tr>
</table>
<!--
EOT;
}elseif($job=='sell_list'){
print <<<EOT
-->
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" class="dragTable" >
  <tr>
  	<td class="head">已购买的广告</td>
  </tr>
  <tr>
  	<td class="middle">
    	<table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr class="trh">
              <td width="29%">广告内容</td>
              <td width="17%" >用户名</td>
              <td width="26%" >投放日期</td>
              <td width="14%" >出价</td>
              <td width="14%" >状态</td>
          </tr>
<!--
EOT;
foreach($listdb AS $key=>$rs){
print <<<EOT
-->
		  <tr class="trc">
            <td style="text-align:left;"><a href="{$rs[adlink]}" target="_blank">{$rs[adword]}</a></td>
            <td>{$rs[username]}</td>
            <td>开始:$rs[begintime] 结束:$rs[endtime] </td>
            <td>$rs[money]</td>
            <td>$rs[state]</td>
          </tr>
<!--
EOT;
}
print <<<EOT
-->
		  <tr> 
              <td colspan="5" class="page">$showpage</td>
          </tr>
        </table>
    </td>
  </tr>
</table>
<!--
EOT;
}elseif($job=='edit'){
print <<<EOT
-->
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="dragTable">
<form name="form1" method="post" action="?">
  <tr> 
    <td colspan="2" class='head'>购买广告</td>
  </tr>
  <tr> 
    <td class="tdL"> 广告位名称:</td>
    <td class="tdR">{$rsdb[name]}</td>
  </tr>
  <tr> 
    <td class="tdL">投放日期:</td>
    <td class="tdR">开始:$rsdb[begintime] &nbsp;&nbsp; 结束:$rsdb[endtime] </td>
  </tr>
  <tr> 
    <td class="tdL">出价:</td>
    <td class="tdR">$rsdb[money] </td>
  </tr>
  <tr> 
    <td class="tdL">广告文字内容:</td>
    <td class="tdR"><input type="text" name="postdb[adword]" value="$rsdb[adword]"></td>
  </tr>
  <tr> 
    <td class="tdL">广告链接地址:</td>
    <td class="tdR"><input type="text" name="postdb[adlink]" size="50" value="$rsdb[adlink]"></td>
  </tr>
  <tr>
    <td colspan="2" class="inputsubmit"> 
      <input type="submit" name="Submit2" value=" 修 改  ">
      <input type="hidden" name="step" value="2">
      <input type="hidden" name="ad_id" value="$ad_id">
      <input type="hidden" name="job" value="$job">
    </td>
  </tr>
</form>
</table>
<!--
EOT;
}print <<<EOT
-->

<!--
EOT;
?>
-->